package com.lhhu.demo.service.impl;

import com.lhhu.demo.bean.BookMessage;
import com.lhhu.demo.mapper.SearchMapper;
import com.lhhu.demo.service.SearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Auther 虎
 * @Data 2021/3/21 20:39
 * @Version 1.0
 */
@Service
public class SearchServiceImpl implements SearchService {
    @Autowired
    private SearchMapper searchMapper;

    @Override
    public List<BookMessage> getBookByMoneyUp(String bookName) {
        return searchMapper.getBookByMoneyUp(bookName);
    }

    @Override
    public List<BookMessage> getBookByMoneyDown(String bookName) {
        return searchMapper.getBookByMoneyDown(bookName);
    }

    @Override
    public List<BookMessage> getBookByDiscountUp(String bookName) {
        return searchMapper.getBookByDiscountUp(bookName);
    }

    @Override
    public List<BookMessage> getBookByDiscountDown(String bookName) {
        return searchMapper.getBookByDiscountDown(bookName);
    }

    @Override
    public List<BookMessage> getBookByCategoryAndMoneyUp(String bookCategoryId) {
        return searchMapper.getBookByCategoryAndMoneyUp(bookCategoryId);
    }

    @Override
    public List<BookMessage> getBookByCategoryAndMoneyDown(String bookCategoryId) {
        return searchMapper.getBookByCategoryAndMoneyDown(bookCategoryId);
    }

    @Override
    public List<BookMessage> getBookByCategoryAndDiscountUp(String bookCategoryId) {
        return searchMapper.getBookByCategoryAndDiscountUp(bookCategoryId);
    }

    @Override
    public List<BookMessage> getBookByCategoryAndDiscountDown(String bookCategoryId) {
        return searchMapper.getBookByCategoryAndDiscountDown(bookCategoryId);
    }
}
